<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version="1.0">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> 
	<xsl:strip-space elements="*" />

	<xsl:template match="posts">
		<section class="postsList">
			<xsl:apply-templates/>
		</section>
	</xsl:template>

	<xsl:template match="post">
		<article>
			<header>
				<xsl:text>Par </xsl:text><a href="UserMessage-{author/@id}.html"><xsl:value-of select="normalize-space(author)"/></a>
			</header>
			<section>
				<xsl:value-of select="normalize-space(message)"/>
			</section>
			<aside>
				<a href="{@url}">Article seul</a>
			</aside>
			<footer>
				<xsl:text>Le </xsl:text><xsl:value-of select="normalize-space(date)"/>
			</footer>
		</article>
	</xsl:template>
</xsl:stylesheet>
